﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Plotter
{
    class ObjectPoints
    {
        public static Point[] GetRandomPoints(int count)
        {
            List<Point> temp = new List<Point>();
            Random rand = new Random();
            for (int i = 0; i < count; i++)
            {
                temp.Add(new Point(rand.Next(100), rand.Next(100)));
            }
            return temp.ToArray();
        }

        public static Point[] Triangle()
        {
            List<Point> temp = new List<Point>();
            temp.Add(new Point(0, 0));
            temp.Add(new Point(15, 10));
            temp.Add(new Point(20, 0));

            return temp.ToArray();
        }


        public static Point[] GetCircle()
        {
            List<Point> temp = new List<Point>();
            List<Point> reversePoints = new List<Point>();
            double radius = 25000;
            for (double x = -1 * radius; x <= radius; x += ((double)radius / 10.0))
            {
                double y = Math.Sqrt(radius * radius - x * x);
                Point p = new Point((int)x, (int)y);
                temp.Add(new Point(p.X + (int)radius, p.Y + (int)radius));
                reversePoints.Add(new Point(p.X + (int)radius, -p.Y + (int)radius));              
            }
            reversePoints.Reverse();
            temp.AddRange(reversePoints);
            return temp.ToArray();
        }


        public static Point[] SquareMaximum()
        {
            List<Point> temp = new List<Point>();
            temp.Add(new Point(0, 0));
            temp.Add(new Point(0, 376));
            temp.Add(new Point(442, 376));
            temp.Add(new Point(442, 0));

            return temp.ToArray();
        }

        public static Point[] GetSquare()
        {
            List<Point> temp = new List<Point>();
            temp.Add(new Point(0, 0));
            temp.Add(new Point(0, 100));
            temp.Add(new Point(100, 100));
            temp.Add(new Point(100, 0));

            return temp.ToArray();
        }

    }
}
